package com.alibaba.japan.club.runtime.springmvc.servlet.view.freemarker;

import java.util.Map;

import org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver;

public class JapanFreeMarkerViewResolver extends FreeMarkerViewResolver {

	/**
	 * 将host的module属性设置到freemarker的全局静态变量中
	 * 
	 * @param hostModuleAttributes
	 */
	@SuppressWarnings("unchecked")
	public void setModuleAttributes(Map<String,String> moduleAttributes) {
		getAttributesMap().putAll(moduleAttributes);
	}

	/**
	 * Requires FreeMarkerView.java
	 * 
	 * @see JapanFreeMarkerView
	 */
	@SuppressWarnings("unchecked")
	public Class requiredViewClass() {
		return JapanFreeMarkerView.class;
	}
}
